<!-- S 同城商家 -->
<script type="text/javascript">
	function selectArea(county){
		$('#pageNo2').attr('value','1');
		$('#county').attr('value',county);
		$('#form2').submit();
	}
	
	function pageNext2() {
		$('#county').attr('value',${county});
		$('#pageNo2').attr('value',${page.pageNum+1});
		$('#form2').submit();
	}
	
	function pagePre2() {
		$('#county').attr('value',${county});
		$('#pageNo2').attr('value',${page.pageNum-1});
		$('#form2').submit();
	}
	
	function pageSelect2() {
		$('#county').attr('value',${county});
		$('#form2').submit();
	}
</script>
<section class="city-product business-pro">
	<div class="hd">
		<h2 class="hd-t">同城商家</h2>
	</div>
	<div class="bd">
		<!-- 地区选择 -->
		<form id="form2" name="form2" action="${basePath}city/index.htm#A2" method="post">
			<input type="hidden" name="county" id="county" value="0"/>
			<div class="related-cate">
				<strong class="t">行政区域：</strong>
				<#if county=='0'>
					<span class="cur">
				<#else>
					<span>
				</#if>
				<a href="javascript:void(0);" onclick="selectArea('0')" name="A2" id="A2">全部</a></span>
				<#if citys?exists>
					<#list citys as city>
						<#if city.name==county>
							<span class="cur">
						<#else>
							<span>
						</#if>
						<a href="javascript:void(0);" onclick="selectArea('${city.name}')">${city.name}</a></span>
					</#list>
				</#if>
			</div>
		
			<#if page?exists>
				<#if page.rows?exists>
					<ul class="clearfix busi-pro-list">
						<#list page.rows as ads>
							<li>
								<#if ads.id?exists>
									<a href="${basePath}business/${ads.id}.htm" target="_blank" class="img">
								<#else>
									<a href="#" target="_blank" class="img">
								</#if>
								<img src="${img_server_url + "/" + ads.imageUrl}"/>	</a>
								<p class="n">
								<#if ads.id?exists>
									<a href="${basePath}business/${ads.id}.htm" target="_blank" class="img">
								<#else>
									<a href="#" target="_blank" class="img">
								</#if>
								${ads.description}</a></p>
							</li>
						</#list>
					</ul>
				</#if>
			
				<#if page.totalPage != 0>
					<div class="page-nav">
						<#if page.pageNum==1>
							<span class="start">上一页</span>
						<#else>
							<a href="javascript:pagePre2();" class="prev">上一页</a>
						</#if>
						
						<span class="page-info">转到
							<select id="pageNo2" name="pageNo2" onchange="pageSelect2()">
								<#if page.totalPage != 0>
									<#list 1..page.totalPage as p>
										<option <#if p==page.pageNum>selected="selected"</#if> value="${p }">${p }</option>
									</#list>
								</#if>
							</select>
							/${page.totalPage }页
						</span>
						
						<#if page.pageNum == page.totalPage>
							<span class="last">下一页</span>
						<#else>
							<a href="javascript:pageNext2();" class="next">下一页</a>
						</#if>
					</div>
				</#if>
			</#if>
		</form>
	</div>
</section>
<!-- E 同城商家 -->